use away_mq_server::server::Server;

#[tokio::main]
async fn main() {
    let mut host = Server::new();
    host.subscribe("pub", &|msg| {
        println!("event1 {:?}", msg);
    });

    host.subscribe("b", &|msg| {
        println!("event2 {:?}", msg);
    });

    host.listen("127.0.0.1:8080").await;
}
